#ifndef LIGHTNING_LOD_H
#define LIGHTNING_LOD_H

#include <vector>
#include <GL/gl.h>
#include "light.h"

class lighting
{
   private:
   GLfloat glob_amb[4];
   public:
   GLenum shade_model;
   std::vector<light> lights;

   private:
   typedef std::vector<light>::iterator lights_iterator;

   public:
   bool set_shade_model(GLenum model);
   void set_global_ambient(const GLfloat* ambient);
   bool add_light(const light& l);
   bool del_light(const light::position& pos);
   void enable();
   void disable();
   bool enabled();
   

   lighting()
   {
      glob_amb[0] = 0.2;
      glob_amb[1] = 0.2;
      glob_amb[2] = 0.2;
      glob_amb[3] = 1.0;
      shade_model = GL_SMOOTH;

      glLightModelfv(GL_LIGHT_MODEL_AMBIENT, glob_amb);
      glShadeModel(shade_model);
   }
};

#endif
